package com.atguigu.jxc.controller;


import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.PurchaseList;
import com.atguigu.jxc.entity.Supplier;
import com.atguigu.jxc.service.PurchaseListGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("purchaseListGoods")
public class PurchaseListGoodsController {


    @Autowired
    PurchaseListGoodsService purchaseListGoodsService;
//进货单保存
    /**
     * 请求URL：http://localhost:8080/purchaseListGoods/save?purchaseNumber=JH1605768306735（进货单号前端生成）
     * 请求参数：PurchaseList purchaseList, String purchaseListGoodsStr
     * 请求方式：POST
     * 返回值类型：JSON
     * 返回值：ServiceVO
     */
    @PostMapping("save")
    public ServiceVO save(PurchaseList purchaseList, String purchaseListGoodsStr){
            purchaseListGoodsService.save(purchaseList,purchaseListGoodsStr);
            return  new ServiceVO(100,"请求成功",null);
    }




}
